package com.hsylient.javase.chapter10;

import org.junit.Test;

import java.time.LocalDate;
import java.time.Month;

public class MyLocalDate {

    private static final LocalDate NOW = LocalDate.now();

    @Test
    public void testConstructor() {
        LocalDate.now();
        LocalDate.of(2022, Month.NOVEMBER, 19);
        LocalDate.of(2022, 11, 27);
    }

    @Test
    public void testMethod() {
        System.out.println(NOW.getYear());
        System.out.println(NOW.getMonthValue());
        System.out.println(NOW.getDayOfMonth());
        System.out.println(NOW.getDayOfWeek().getValue());
        System.out.println(NOW.plusDays(4));

    }
}
